package com.neu.flashmall.product.mapper;

import com.neu.flashmall.product.entity.PmsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 50286
* @description 针对表【pms_category(商品三级分类)】的数据库操作Mapper
* @createDate 2022-06-29 11:34:41
* @Entity com.neu.flashmallproduct.entity.PmsCategory
*/
@Mapper
public interface PmsCategoryMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PmsCategory record);

    int insertSelective(PmsCategory record);

    PmsCategory selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PmsCategory record);

    int updateByPrimaryKey(PmsCategory record);

    List<PmsCategory> selectAll();

    List<PmsCategory> selectByLevel(Integer level);

    PmsCategory selectByName(String name);

    List<Long> selectAllSonById(Long id);

    List<PmsCategory> selectByParentId(Long id);

    int deleteAllById(List<Long> idList);

    List<PmsCategory> selectQuantitySecondLevel(int quantity);

    List<PmsCategory> selectQuantityByParentId(@Param("parentId") Long parentId,@Param("quantity") int quantity);
}
